home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutor.exe
/
ANSWERS
/
CH09_1.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-15
|
522b
|
28 lines
#include "stdio.h"
#include "conio.h"
void main()
{
char input_char;
printf("Hit any key - to stop hit a $\n");
do {
input_char = _getch();
printf("Input character is %c, numerical value is %3d\n",
input_char, input_char);
} while (input_char != '$');
}
/* Result of execution
Hit any key - to stop hit a $
Input character is A, numerical value is 65
Input character is B, numerical value is 66
...
(The display depends on the input keys hit)
*/